/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50734
 Source Host           : localhost:3306
 Source Schema         : spring_web

 Target Server Type    : MySQL
 Target Server Version : 50734
 File Encoding         : 65001

 Date: 21/02/2024 18:50:01
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sw_admin
-- ----------------------------
DROP TABLE IF EXISTS `sw_admin`;
CREATE TABLE `sw_admin` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '管理员ID',
  `account` varchar(255) NOT NULL COMMENT '登录账号  唯一',
  `password` varchar(255) NOT NULL COMMENT '登录密码',
  `nick_name` varchar(255) DEFAULT NULL COMMENT '昵称',
  `phone` varchar(12) DEFAULT NULL COMMENT '手机号',
  `e_mail` varchar(255) DEFAULT NULL COMMENT '电子邮箱',
  `sex` tinyint(1) NOT NULL DEFAULT '0' COMMENT '性别,0:男 1:女 2:未知',
  `avatar` varchar(255) DEFAULT NULL COMMENT '用户头像',
  `is_supper` tinyint(1) NOT NULL DEFAULT '0' COMMENT '超级超级管理员,1:是 0:否',
  `role_id` int(11) NOT NULL DEFAULT '0' COMMENT '角色ID',
  `is_account_non_expired` tinyint(1) NOT NULL DEFAULT '1' COMMENT '账号是否过期(1:未过期,0:已过期)',
  `is_account_non_locked` tinyint(1) NOT NULL DEFAULT '1' COMMENT '账号是否被锁定(1:未锁定,0:已锁定)',
  `is_credentials_non_expired` tinyint(1) NOT NULL DEFAULT '1' COMMENT '密码是否已过期 (1:未过期,0:已过期)',
  `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '管理员类型 0:系统 ',
  `last_ip` varchar(255) NOT NULL DEFAULT '' COMMENT '最后登录IP',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='管理员';

-- ----------------------------
-- Records of sw_admin
-- ----------------------------
BEGIN;
INSERT INTO `sw_admin` VALUES (1, 'admin', '$2a$10$1KgcC7YBr9jmc/Jd06B0z.j2JJGce92XW5x2j.5kvoUyHu7HZKNNe', '超级管理员', '13999821190', 'teshna@163.com', 0, '1708261010208', 1, 0, 1, 1, 1, 0, '', '2024-02-16 01:00:17', '2024-02-18 20:56:50');
INSERT INTO `sw_admin` VALUES (2, 'aaa', '$2a$10$raLU5jcWdj2NpyFJQ/ju..yCNm.BoDwKi2Sxm0D9buvHnfPKk.jny', 'aa', '15699175460', 'aaaa@163.com', 0, '1708085135897', 0, 1, 1, 1, 1, 0, '', '2024-02-16 19:07:57', '2024-02-16 20:29:43');
COMMIT;

-- ----------------------------
-- Table structure for sw_config
-- ----------------------------
DROP TABLE IF EXISTS `sw_config`;
CREATE TABLE `sw_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '配置id',
  `type` varchar(32) NOT NULL COMMENT '配置类型',
  `key` varchar(32) NOT NULL COMMENT '配置键',
  `value` text COMMENT '配置值',
  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否启用  1:是  0:否',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=utf8 COMMENT='系统配置';

-- ----------------------------
-- Records of sw_config
-- ----------------------------
BEGIN;
INSERT INTO `sw_config` VALUES (1, 'basic', 'title', 'NaivePlus', 0);
INSERT INTO `sw_config` VALUES (2, 'basic', 'logo', '1708360360979', 0);
INSERT INTO `sw_config` VALUES (3, 'basic', 'icp', '粤ICP备2024165014号-1', 0);
INSERT INTO `sw_config` VALUES (4, 'basic', 'icp_url', 'https://fanyi.baidu.com', 0);
INSERT INTO `sw_config` VALUES (5, 'basic', 'copyright', 'Copyright©2023-2025  - 版权所有', 0);
INSERT INTO `sw_config` VALUES (6, 'policy_a', 'service', '服务协议', 0);
INSERT INTO `sw_config` VALUES (7, 'policy_a', 'service_cont', '<p>服务协议服务协议服务协议服务协议服务协议服务协议</p>', 0);
INSERT INTO `sw_config` VALUES (8, 'policy_a', 'privacy', '隐私协议', 0);
INSERT INTO `sw_config` VALUES (9, 'policy_a', 'privacy_cont', '<p><span style=\"color: rgb(51, 54, 57); background-color: rgb(255, 255, 255); font-size: 14px;\">隐私协议隐私协议隐私协议隐私协议隐私协议</span></p>', 0);
INSERT INTO `sw_config` VALUES (10, 'policy_a', 'reg', '注销协议', 0);
INSERT INTO `sw_config` VALUES (11, 'policy_a', 'reg_cont', '<p><span style=\"color: rgb(51, 54, 57); background-color: rgb(255, 255, 255); font-size: 14px;\">注销协议注销协议注销协议注销协议注销协议注销协议</span></p>', 0);
INSERT INTO `sw_config` VALUES (12, 'customer', 'name', 'aaaaa', 0);
INSERT INTO `sw_config` VALUES (13, 'customer', 'qr_code', '1708360372897', 0);
INSERT INTO `sw_config` VALUES (14, 'customer', 'name1', 'bbbbbb', 0);
INSERT INTO `sw_config` VALUES (15, 'customer', 'qr_code1', '1708360360979', 0);
INSERT INTO `sw_config` VALUES (16, 'customer', 'name2', 'ccccc', 0);
INSERT INTO `sw_config` VALUES (17, 'customer', 'qr_code2', '1708360372897', 0);
INSERT INTO `sw_config` VALUES (18, 'customer', 'phone', '15699175460', 0);
INSERT INTO `sw_config` VALUES (19, 'customer', 'phone1', '13999821190', 0);
INSERT INTO `sw_config` VALUES (20, 'user', 'invite_next', '1', 0);
INSERT INTO `sw_config` VALUES (21, 'user', 'bas_condition', 'true', 0);
INSERT INTO `sw_config` VALUES (22, 'user', 'default_avatar', '1708360372897', 0);
INSERT INTO `sw_config` VALUES (24, 'withdrawal', 'change_interface', 'enterprise', 0);
INSERT INTO `sw_config` VALUES (25, 'withdrawal', 'user_min_money', '1', 0);
INSERT INTO `sw_config` VALUES (26, 'withdrawal', 'user_max_money', '100', 0);
INSERT INTO `sw_config` VALUES (27, 'withdrawal', 'user_fees', '0.1', 0);
INSERT INTO `sw_config` VALUES (28, 'withdrawal', 'teacher_min_money', '10', 0);
INSERT INTO `sw_config` VALUES (29, 'withdrawal', 'teacher_max_money', '1000', 0);
INSERT INTO `sw_config` VALUES (30, 'withdrawal', 'teacher_fees', '0.2', 0);
INSERT INTO `sw_config` VALUES (31, 'withdrawal', 'way', '[balance, wechat_change, wechat_pay_code]', 0);
INSERT INTO `sw_config` VALUES (44, 'sms', 'aliyun', '{secret_key=LTAI5tCq2oxiwtVvext2xBF4, signature=签名, app_id_key=LTAI5tJ5XqgcfQfSnq12MZpj}', 0);
INSERT INTO `sw_config` VALUES (45, 'sms', 'tencent', '{secret_key=tt, secret_id=tt, signature=tt, app_id_key=tt}', 0);
COMMIT;

-- ----------------------------
-- Table structure for sw_img_file
-- ----------------------------
DROP TABLE IF EXISTS `sw_img_file`;
CREATE TABLE `sw_img_file` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `name` varchar(255) NOT NULL COMMENT '分类名称',
  `group_id` int(11) NOT NULL DEFAULT '0' COMMENT '分组id  0：未分组',
  `src` varchar(32) NOT NULL COMMENT '图片',
  `thumb` varchar(255) DEFAULT NULL COMMENT '缩略图',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='图片管理';

-- ----------------------------
-- Records of sw_img_file
-- ----------------------------
BEGIN;
INSERT INTO `sw_img_file` VALUES (2, 'logo.svg', 0, '1708360360979', NULL, '2024-02-20 00:32:40');
INSERT INTO `sw_img_file` VALUES (3, 'vite.svg', 0, '1708360372897', NULL, '2024-02-20 00:32:52');
COMMIT;

-- ----------------------------
-- Table structure for sw_img_group
-- ----------------------------
DROP TABLE IF EXISTS `sw_img_group`;
CREATE TABLE `sw_img_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `name` varchar(32) NOT NULL COMMENT '分类名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='图片分组';

-- ----------------------------
-- Records of sw_img_group
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sw_menu
-- ----------------------------
DROP TABLE IF EXISTS `sw_menu`;
CREATE TABLE `sw_menu` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '权限编号',
  `label` varchar(255) NOT NULL COMMENT '权限名称',
  `parent_id` int(11) NOT NULL DEFAULT '0' COMMENT '父级权限id',
  `parent_name` varchar(255) NOT NULL COMMENT '父级权限名称',
  `code` varchar(255) NOT NULL COMMENT '授权标识符',
  `name` varchar(255) DEFAULT NULL COMMENT '路由名称',
  `url` varchar(255) DEFAULT NULL COMMENT '组件路径',
  `e_link` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否外链接 1:是 0:否',
  `type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '菜单类型 1:目录 2:菜单 3:按钮 ',
  `hide_menu` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否菜单中隐藏 1:是 0:否',
  `icon` varchar(255) DEFAULT NULL COMMENT '图标',
  `sort` int(11) NOT NULL DEFAULT '100' COMMENT '排序',
  `is_delete` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除 1:是 0:否',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COMMENT='菜单权限';

-- ----------------------------
-- Records of sw_menu
-- ----------------------------
BEGIN;
INSERT INTO `sw_menu` VALUES (1, '设置', 0, '顶级菜单', 'sys:manager', 'system', '', 0, 1, 0, 'SettingOutlined', 100, 0, '2024-02-16 01:10:10', '2024-02-16 21:53:13');
INSERT INTO `sw_menu` VALUES (2, '管理员管理', 1, '设置', 'admin:list', 'admin', '/sys/admin', 0, 2, 0, 'User', 4, 0, '2024-02-16 01:10:10', '2024-02-21 17:35:26');
INSERT INTO `sw_menu` VALUES (3, '新增', 2, '管理员管理', 'admin:add', NULL, NULL, 0, 3, 0, NULL, 100, 0, '2024-02-16 01:10:10', NULL);
INSERT INTO `sw_menu` VALUES (4, '修改', 2, '管理员管理', 'admin:edit', NULL, NULL, 0, 3, 0, NULL, 100, 0, '2024-02-16 01:10:10', NULL);
INSERT INTO `sw_menu` VALUES (5, '角色管理', 1, '设置', 'role:list', 'role', '/sys/role', 0, 2, 0, 'UserRole', 3, 0, '2024-02-16 01:10:10', '2024-02-21 17:35:18');
INSERT INTO `sw_menu` VALUES (6, '新增', 5, '角色管理', 'role:add', NULL, NULL, 0, 3, 0, NULL, 100, 0, '2024-02-16 01:10:10', NULL);
INSERT INTO `sw_menu` VALUES (7, '菜单管理', 1, '设置', 'menu:list', 'menu', '/sys/menu', 0, 2, 0, 'BarsOutlined', 2, 0, '2024-02-16 01:10:10', '2024-02-21 17:35:04');
INSERT INTO `sw_menu` VALUES (8, '工具', 0, '顶级菜单', 'tools:manager', 'tools', '', 0, 1, 0, 'Tools', 1, 0, '2024-02-16 01:10:10', NULL);
INSERT INTO `sw_menu` VALUES (9, '数据备份', 8, '工具', 'tools:data_backup', 'data_backup', '/tools/dataBackup', 0, 2, 0, 'DataBase', 2, 0, '2024-02-16 01:10:10', NULL);
INSERT INTO `sw_menu` VALUES (10, 'NaiveUi', 8, '工具', 'tools:baidu', 'naive', 'https://www.naiveui.com/zh-CN/os-theme', 1, 2, 0, '', 100, 0, '2024-02-16 01:10:10', NULL);
INSERT INTO `sw_menu` VALUES (11, '删除', 2, '管理员管理', 'admin:del', '', '', 0, 3, 0, '', 100, 0, '2024-02-16 01:10:10', NULL);
INSERT INTO `sw_menu` VALUES (14, '新增', 7, '菜单管理', 'menu:add', '', '', 0, 3, 0, '', 100, 0, '2024-02-16 01:10:10', NULL);
INSERT INTO `sw_menu` VALUES (15, '修改', 7, '菜单管理', 'menu:edit', '', '', 0, 3, 0, '', 100, 0, '2024-02-16 01:10:10', NULL);
INSERT INTO `sw_menu` VALUES (16, '删除', 7, '菜单管理', 'menu:del', '', '', 0, 3, 0, '', 100, 0, '2024-02-16 01:10:10', NULL);
INSERT INTO `sw_menu` VALUES (17, '修改', 5, '角色管理', 'role:edit', '', '', 0, 3, 0, '', 100, 0, '2024-02-16 01:10:10', NULL);
INSERT INTO `sw_menu` VALUES (18, '删除', 5, '角色管理', 'role:del', '', '', 0, 3, 0, '', 100, 0, '2024-02-16 01:10:10', NULL);
INSERT INTO `sw_menu` VALUES (19, '文档', 8, '工具', 'sys:document', 'document', '/singlePage/document.vue', 0, 2, 0, '', 100, 0, '2024-02-16 19:03:45', '2024-02-16 19:04:07');
INSERT INTO `sw_menu` VALUES (20, '区域管理', 1, '设置', 'region:list', 'region', '/sys/region', 0, 2, 0, 'MapPin', 5, 0, '2024-02-16 22:07:35', '2024-02-21 17:35:33');
INSERT INTO `sw_menu` VALUES (21, '新增', 20, '区域管理', 'region:add', '', '', 0, 3, 0, '', 100, 0, '2024-02-17 00:41:03', NULL);
INSERT INTO `sw_menu` VALUES (22, '修改', 20, '区域管理', 'region:edit', '', '', 0, 3, 0, '', 100, 0, '2024-02-17 00:41:23', NULL);
INSERT INTO `sw_menu` VALUES (23, '删除', 20, '区域管理', 'region:del', '', '', 0, 3, 0, '', 100, 0, '2024-02-17 03:33:24', NULL);
INSERT INTO `sw_menu` VALUES (24, '系统设置', 1, '设置', 'setting:list', 'settings', '/sys/setting', 0, 2, 0, 'DisplaySettingsOutlined', 1, 0, '2024-02-18 14:49:54', '2024-02-21 17:34:56');
INSERT INTO `sw_menu` VALUES (25, '支付配置', 1, '设置', 'pay:save', 'payconfig', '/sys/payConfig', 0, 2, 0, 'AmazonPay', 100, 0, '2024-02-18 17:08:22', '2024-02-18 17:10:00');
INSERT INTO `sw_menu` VALUES (26, '政策协议', 24, '系统设置', 'setting:policy_a', '', '', 0, 3, 0, '', 100, 0, '2024-02-18 20:18:26', '2024-02-18 20:18:48');
INSERT INTO `sw_menu` VALUES (27, '客服设置', 24, '系统设置', 'setting:customer', '', '', 0, 3, 0, '', 2, 0, '2024-02-20 11:57:50', '2024-02-20 12:02:08');
INSERT INTO `sw_menu` VALUES (28, '基本设置', 24, '系统设置', 'setting:basic', '', '', 0, 3, 0, '', 1, 0, '2024-02-20 12:01:57', NULL);
INSERT INTO `sw_menu` VALUES (29, '用户设置', 24, '系统设置', 'setting:user', '', '', 0, 3, 0, '', 4, 0, '2024-02-20 12:02:33', '2024-02-20 12:02:41');
INSERT INTO `sw_menu` VALUES (30, '提现设置', 24, '系统设置', 'setting:withdrawal', '', '', 0, 3, 0, '', 5, 0, '2024-02-20 12:03:13', NULL);
INSERT INTO `sw_menu` VALUES (31, '短信设置', 24, '系统设置', 'setting:sms', '', '', 0, 3, 0, '', 5, 0, '2024-02-20 12:03:37', NULL);
INSERT INTO `sw_menu` VALUES (32, '短信模板', 1, '设置', 'smstemplate:list', 'smstemplate', '/sys/smsTemplate', 0, 2, 0, 'MessageOutlined', 10, 0, '2024-02-21 17:31:15', '2024-02-21 17:34:38');
COMMIT;

-- ----------------------------
-- Table structure for sw_region
-- ----------------------------
DROP TABLE IF EXISTS `sw_region`;
CREATE TABLE `sw_region` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '配置id',
  `name` varchar(32) NOT NULL COMMENT '区域名称',
  `initial` varchar(32) NOT NULL COMMENT '区域首字母',
  `p_id` int(11) NOT NULL DEFAULT '0' COMMENT '上级区域ID',
  `level` tinyint(1) NOT NULL DEFAULT '0' COMMENT '区域等级',
  `longitude` varchar(32) DEFAULT NULL COMMENT '经度',
  `latitude` varchar(32) DEFAULT NULL COMMENT '纬度',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='区域管理';

-- ----------------------------
-- Records of sw_region
-- ----------------------------
BEGIN;
INSERT INTO `sw_region` VALUES (1, '北京', 'B', 0, 1, '', '', '2024-02-21 17:08:14', NULL);
COMMIT;

-- ----------------------------
-- Table structure for sw_role
-- ----------------------------
DROP TABLE IF EXISTS `sw_role`;
CREATE TABLE `sw_role` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '角色ID',
  `name` varchar(255) NOT NULL COMMENT '角色名',
  `role_describe` varchar(255) NOT NULL COMMENT '角色描述',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '角色状态(1:启用,0:停用)',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='角色';

-- ----------------------------
-- Records of sw_role
-- ----------------------------
BEGIN;
INSERT INTO `sw_role` VALUES (1, '测试角色', '测试角色', 1, '2024-02-16 17:58:44', '2024-02-16 21:03:08');
COMMIT;

-- ----------------------------
-- Table structure for sw_role_permission
-- ----------------------------
DROP TABLE IF EXISTS `sw_role_permission`;
CREATE TABLE `sw_role_permission` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '角色权限ID',
  `role_Id` bigint(20) NOT NULL COMMENT '角色ID',
  `permission_Id` bigint(20) NOT NULL COMMENT '权限ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COMMENT='角色权限';

-- ----------------------------
-- Records of sw_role_permission
-- ----------------------------
BEGIN;
INSERT INTO `sw_role_permission` VALUES (26, 1, 8);
INSERT INTO `sw_role_permission` VALUES (27, 1, 9);
INSERT INTO `sw_role_permission` VALUES (28, 1, 10);
INSERT INTO `sw_role_permission` VALUES (29, 1, 2);
INSERT INTO `sw_role_permission` VALUES (30, 1, 1);
INSERT INTO `sw_role_permission` VALUES (31, 1, 5);
INSERT INTO `sw_role_permission` VALUES (32, 1, 7);
COMMIT;

-- ----------------------------
-- Table structure for sw_sms_template
-- ----------------------------
DROP TABLE IF EXISTS `sw_sms_template`;
CREATE TABLE `sw_sms_template` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `name` varchar(255) NOT NULL COMMENT '模板名称',
  `enable` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否启用  1:启用  0:停用',
  `template_code` varchar(255) DEFAULT NULL COMMENT '模板编码',
  `scene` tinyint(2) NOT NULL DEFAULT '0' COMMENT '使用场景 0：注册  1：登录 2：支付成功通知 3：待支付通知 4：绑定电话通知',
  `template_type` tinyint(2) NOT NULL DEFAULT '0' COMMENT '短信类型。取值：0：验证码。1：短信通知。 2：推广短信。3：国际/港澳台消息。 推广短信和国际/港澳台消息仅支持企业用户。',
  `template_content` text NOT NULL COMMENT '模板内容，长度不超过500个字符',
  `remark` varchar(255) DEFAULT NULL COMMENT '短信模板申请说明，是模板审核的参考信息之一。长度不超过100个字符。',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='短信模板';

-- ----------------------------
-- Records of sw_sms_template
-- ----------------------------
BEGIN;
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
